<?php
require_once 'inc/mysql.inc.php';
require_once 'inc/changePerson.php';

include "inc/header_emptyMM.html";
include("inc/header_loggedin.php");

$pinfo = $_SESSION['pinfo'];
$granty = $pinfo['granty']
?>

<!-- Datedit by Ivo Skalicky - ITPro CZ - http://www.itpro.cz -->
<link rel="stylesheet" href="datedit/datedit.css" type="text/css" media="screen" />
<script type="text/javascript" charset="iso-8859-1" src="datedit/datedit.js"></script>
<script type="text/javascript" charset="utf-8" src="datedit/lang/cz.js"></script>


<script type="text/javascript">
  datedit("datum","d.m.yyyy");
</script>

<form name="NovaUdalost" method="POST" action="vogoni.php">
    <input type="hidden" name="TypDat" value="NovaUdalost">
<!--    <input type="hidden" name="typ_udalosti" value="3">-->
    <div class="inputRequired">
            <div class="inputFormTable">
            <input type="radio" name="typ_udalosti" value="3" checked="checked">Chci
            &nbsp;&nbsp;&nbsp;
            <input type="radio" name="typ_udalosti" value="4">Nechci
            </div>

         
    </div>
    <br>
    vykázat dobu
    <br>
    <table  class="inputFormTable">
            <tr>
            <td class="inputRequired">den:</td><td><input type="text" id="datum" name="datum_od" /><!--onblur="check_date(this)"--> </td>
            <td class="inputRequired">čas od:</td><td><input type="text" name="cas_od_h" size="2" onblur="isHH(this);"/> : <input type="text" name="cas_od_m" size="2" value="00" onblur="isMM(this);"/></td>
            <td class="inputRequired">čas do:</td><td><input type="text" name="cas_do_h" size="2" onblur="isHH(this);"/> : <input type="text" name="cas_do_m" size="2" value="00" onblur="isMM(this);"/></td>
    </table>
    <br>
    do výkazu docházky
    <table class="inputFormTable">
        
        <tr>
            <td>
            <?php 
                 $i=0;
                 foreach ($granty as $g) { 
                    echo '<input type="radio" name="NovaUdalost_Granty[]" value="'.$g['project'].'" />';
                    echo $g['Name'];
                    echo '&nbsp;&nbsp;&nbsp;';
                }
                echo '<input type="radio" name="NovaUdalost_Granty[]" value="0" checked="checked"/>MÚ (bez grantu)&nbsp;&nbsp;&nbsp;&nbsp;'; // 0 means no grant
                ?>      
            </td>
            </tr>
    </table>
    <br>
    <table class="inputFormTable">            
            <tr>
                <td>Další účastníci:</td>
             </tr>
            <?php GenerateChangePersonCheckboxesTable('NovaUdalost_Ucastnici'); ?>
   
    </table>
    <br>
    <table class="inputFormTable">              
            <tr><td class="inputRequired">Popis:</td><td colspan="3"><input type="text" name="ucel"  size="80"  /></td></tr>            
            <tr><td>Poznámka:</td><td colspan="3"><input type="text" name="poznamka" size="80" /></td></tr>              

    </table>

    <input type="hidden" name="mesto"  value=""/>
    <input type="hidden" name="stat"   value=""/>

    <br>
    <input type="submit" name="form_action_Udalosti" value="Vytvořit" />
    <input type="submit" name="form_action_Udalosti" value="Nevytvářet" onclick="form.action='vogoni.php';">
</form>




<?php
include("inc/footer.html");
?>
